<template>
    <div >
        <div>
            <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>全局视图</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="contoner">

        <div class="mokuai">
            <i class="icon-yonghu iconfont"></i>
           <div class="num1">用户总数:</div>
           <span style="color:red">{{userDate}}</span>
        </div>
        
        <div class="mokuai">
            <i class="icon-dingdan iconfont"></i>
           <div class="num1">今日新增订单:</div>
           <span style="color:red">{{orderNum}}</span>
        </div>
       
                    
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            userDate:"",
            orderNum:0
        }
    },
    created(){
        this.getUser();
        this.getOrderNum()
    },
    methods:{
        getUser(){   //获得用户
            this.$api.get("/user/findUserNumByAdmin","",Response=>{
                this.userDate = Response.data.data;
            })
        },
        getOrderNum(){
            this.$api.get("/orders/findOederNum","",Response=>{
                this.orderNum = Response.data.data;
            })
        }
    }
}
</script>
<style scoped>
.contoner{
    margin-top: 20px;
    text-align: center;
}
.mokuai{
    width: 250px;
    background-color: azure;
    height: 100px;
    line-height: 100px;
    border-radius: 30px;
    text-align: center;
    display: inline-block;
    font-size: larger;
}
.mokuai:hover{
    width: 250px;
    background-color: rgb(168, 173, 173);
    height: 100px;
    line-height: 100px;
    border-radius: 30px;
    text-align: center;
    display: inline-block;
    font-size: larger;
}
.num1{
    padding-left: 10px;
    font-size: larger;
    display: inline-block;
    padding-left: 10px;
}
</style>